worked further on corner collisions