refactoring / cleanup for the post