Changes made to problem 1