fix the order of parameters as in the order they are documented in the code

Hi,

can you take this fix, 
the order is impotent in the tools we are writing
(in the past we manually did it, I thought this code isn't maintained anymore)

but new I see there a new version (which broke our client code that was using our tools)

Israel