made refactoring changes