A more informative sort (the merge function is needed in here)