refactored Set and mixed constructor