moved collision detection into a folder