sorting dictionary using itemgetter