code working with dictionaries