updated hit test on polygon