adding convex hull code