add applyCommands