Refactor ch03/ex07