Adding SortedDict class for post display