some refactoring is done