Added sort functions to assignment10