Code for cs106b