second version of containsPoint