small changes to generator, all states get a unique int