Code to help complete Homework #1