SPoT (cs193p -2013): assignment4