add containsPoint function