moved enemy collision detection to it's own function