changing mouse hit test to new way