added polygon collision