refactoring constructors