added sort without io