mostly done with algtop pset 4