updated dict_set_solution with more concise way to update dictionary