end of cs223a homework 2