base class for some common functionality