optimizing the scene