added salary check optimization. Helps by about 1%.