new code based on the TDD