Updated collision method to be more efficient.