completed hw1  exercises 5 and 6