more refactoring and touched BDD. end ch 9