changed some small things in problem 3