sort into a scalar