generator now working