integrating command and generation