At the University of Vienna, Hayek initially studied mostly philosophy, psychology and economics. The University allowed students to choose their subjects freely and there wasn't much obligatory written work, or tests except main exams at the end of the study. By the end of his studies Hayek became more interested in economics, mostly for financial and career reasons; he planned to combine law and economics to start a career in diplomatic service. He earned doctorates in law and political science in 1921 and 1923 respectively.