add: to_dict
fix: do not use asserts as part of prog flow