synced with book version
End of ch6