Changed the code to correspond with the assignment text