updated string assignment using dictionaries