Imporving the generator