refactored view-code of the example blog