algorithm to scrape exam table