some refactoring
more refactoring