My attempt at the assignment.