build dictionaries