modified collision checking