updated array to use onGetState/onSetState