method with convexHull function added