made collision check clearer