in function clear(), remove some reset operations on variables which have public getXXX() functions