Updated generator to include initializer