implement hit test