Edited collision code