gen now outputs to directory