Wage Distribution and the Sorting of Workers