added function calls to constructors