changed dictionary from string to map