command design pattern complete with comments