refactor constructors