automatic output size determination