Finished Ch 4, fixes #1