fixing the generator. learning