added dict_to_class