Added preview sort functionality.