added collision code et al

added collision code et al