Add collision detection