render method separation and refactoring