simplify size check