implemented table loading and caching