update TDD and refactory