fixed bug in handout code as per piazza - ridiculous