HW5 writeup