Rewrote based on the code walkthrough.