modified generate command