read index table into main memory

The other parts still need to debug