fixed some stuff in preparation for collision detection