added sort in instruction