working except for timing error from part 1.