readState generalized
expand2 added
Expand functions added