Write some comments in the readState(), and delete some useless parameters.