Changed generator a little