finished the basic generator