Implemented external sort