implemented table siwtching buttons