code from <test driven develope>