HW5 problem E done