Initial code from the assignment