Building up the generator