add problem 7 recursively