pulled out most of hit detection