Completed question 35

Not particularly efficient, but hey it works.