with endScene function