refactoring the update of salaries, and allow users to update their own