add command design pattern.