add collision code (WIP)