refactored rendering methods