added tests for sort