taken directly from the generator circuit