sorting should only run on multiple inputs