better sorting of commands, only master is deployed