add command pattern.