This is my solution to assignment 1 of CS106A