Lab 5 - Final Code for 5.2