shorten dynamic convex hull code