refactorization of the first test