refactoring render function
improved css
fix page-break pattern