calulate the max length of the column