simplified collision detection, it's better now, but stil not correct