Refactor ch01