made ordering of params consistent across functions