refactoring
some refactoring