minor changes refactoring