convex hull impl