adding documentation for the State class