refactorization complete