up to problem 7