this consolidates code from multiple constructors