Initial version for chapter8