add collision detect