making generate()