solution for morestuff exercise 4