Added sort function and a test for it