Fixed hardcored amountOfSalaries and added average calc