created friend class CommandFactory