Update hw12 problem 4