homework 3 for cs184