Completet assignment 1 (Exercises 8-10)