added lines, optimized for convex case
lines