Marxist economics are based on the economic theories of Philosopher Karl Marx. Marx's theories explain the "laws of motion" of production and exchange under capitalism. This theory was used to argue against the middle class theories of economics common at that time. Marx wanted this to be a tool for the working class (the proletariat) to use to overthrow capitalism and replace it with socialism, then with communism. Socialism, would be a step towards the disappearance of the state, and communism would be, according to Marx, a society where goods and services would be distributed "to each according to his need, from each according to his ability."