new generator with template param for including Jacobians (passing unit tests)