working on inelastic collisions