solution for morestuff exercise 2