refacture to_hit function