changed dict to OrderedDict. Output rendered correctly