Adding a new function to update departments.
Adding logic to save departments.
This validation was created to not allow adding more departments.
Not using switch structure anymore.
Updating changes to the latest version.