hw5 design writeup