updated for particle collision detection and response