Solution to day 2 #8.