Commit implementation of problem 15