sort merged results