removed delete button if user not authorized and removed unused code