Finished the exercise (more or less)