Stanford assignment 1