Added dictionary-creating function from lab 2v1.