base class and subclass constructors