working __to_dict()