fixed bug in solution to exam