reorganise for multi-table