updated hit detection algo