removed now unnecessary calls to sorted()