convex hull. the code is not functional tho