making collision as a parameter