refactoring partII