convex hull done without refactoring