added sizeCalc function