refactoring ess post