terminated first part of refactoring