Added function to create dictionary.