added ViewState functionality