added sort to browse sql