CS193 assignment 5