added to problem 5