constructor refactoring