improve table expanding