diff --git a/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java b/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java
+++ b/src/main/java/org/psjava/ds/geometry/PointByXYComparator.java
@@ -6,15 +6,9 @@ import org.psjava.util.SeriesComparator;
 
 public class PointByXYComparator {
 
+	@SuppressWarnings("unchecked")
 	public static <T> Comparator<Point2D<T>> create(Comparator<T> comp) {
-		@SuppressWarnings("unchecked")
-		final Comparator<Point2D<T>> series = SeriesComparator.create(PointByXComparator.create(comp), PointByYComparator.create(comp));
-		return new Comparator<Point2D<T>>() {
-			@Override
-			public int compare(Point2D<T> o1, Point2D<T> o2) {
-				return series.compare(o1, o2);
-			}
-		};
+		return SeriesComparator.create(PointByXComparator.create(comp), PointByYComparator.create(comp));
 	}
 
 	private PointByXYComparator() {
refactoring - make code simpler PointByXYComparator