Added some testcode for sort