Assignment 4 of CS193P