added protection to edit & details