Gravitationally unstable protostellar discs and their role in planet formation