prepares for value sorting