hit function fix