code to pull table into RAM