basic pay function