The union shop was ruled illegal by the Supreme Court.[10] States with right-to-work laws go further by not allowing employers to require employees to pay a form of union dues, called an agency fee. An employer may not lawfully agree with a union to hire only union members, but it may agree to require employees to join the union or pay the equivalent of union dues to it within a set period after starting employment. Similarly, a union could require an employer that had agreed to a closed shop contract prior to 1947 to fire an employee who had been expelled from the union for any reason, but it cannot demand an employer to fire an employee under a union shop contract for any reason other than failure to pay dues that are required by all employees.