refactoring and reorganising