An Algorithm for Earthquakes Clustering based on Maximum Likelihood