rename variable
added localState,remoteState as instance-variables