move the sell by date to the top of the loop