fixes order of input values