amend value storing method not to use virtual functions.