updated collision checking