changes to collision code