perform refactoring to classes and package