final project code as of Feb 2 2014 --KW