Solution to lab 9