tried to complet open() function in Tablescan.cpp