Added helper function to obtain salary