added delete function to delete the post by the author