add spec and solution for problem 4