add sort functions to GUI