Made modifications to more closely align with the assignment description