added logic for showing new edit and delete post