add contact and collision code