Completed Prog2 Assignment