update hw0 problem 4-8