added abilities to edit, delete posts. refactoring