using OrderedDict to preserve key order