added simple collisioncheck function