solved pset 2, parts 2 and 3