first refactoring draft