made extractTables() more robust and added second team