moved salary history logic to model