better and more general method for collision detection. seems to be working