add applyGen so state can be accessed after generating 1