- added dictionary sorting functionality