corrected and implemented some collision detection