collision code clean up