fixed add_key_to_list to iterate over char vector too