homework project 3 for cs-240 fall 2011