added functionality to delete posts