better documentation of State