collision implementation