improved code styles and add posts for pdf reporting