Problem 16. Nothing smart to it (my implementation anyway)