Added code to test sorting