fixes up last problem set code