Modified containsPoint