before replacing collision code