sorted saved to variable