put tuple in the right order.