made varying tablelength work