further refactoring to reveal intent of the rendering flow