Solved problem 10. Added moize function.