adjusted order of commands