Implemented problem 15