Standford assignment 1