updated code for scrolling both horizondal and vertical. Loaded table