How did the Nazi-Soviet Pact help advance Stalin's goals for the Soviet Union?

How did the Nazi-Soviet Pact help advance Stalin’s goals for the Soviet Union?

A) It helped him transform Russia into a fascist state.
B) it showed Stalin’s support for Hitler’s plan to increase “living space” for a superior race.
C) it gave Stalin a strong ally against the west.
D) it gave him a chance to expand Russian territory in Eastern Europe.