state now configures number of loops at construction