aphyer's submission for Pset 1.2