modified the order of commands