Remove usage of .sorted