Solution to problem 008