Changes to problem 6