began code refactorization