refactor shared code out of derived class constructors