Updated according to HW6.part1