add size decision function