added update() to State
fixes to Tree class