refactored post editing