Problem 0 on HW5 done