Chapter05 rewrites