COLLISION ADDED
Merged collision code to the best branch (Rob's)