added base class, and added other more function