refactoring packages and interfaces