Adding problem 4.
Adding problem 5 and tests