change algorithm of hit