problem 6 solved; improved answer to problem 3