added sort order control