Line 20 was missing a closing bracket for the while loop.