re-order parameters to match the order in which they are used