added logic to determine whether a point is inside a custom drawn polygon
updates