update base.h and base.cpp