let database sort user, add the values while generating the dict and use OrderedDict