Refactorization part 2