add collision logic