adding directive conditional for sub generator