refactor an test phase 1