change the way to fetch generator g