updated sorting and formatted salaries with commas