issue #32: to_dict implementation