Complete example of command design pattern