some refactoring on initialization of initialSet