add sort functionality to input group