command pattern: command and history