started working on polygon collision detection