update size calculation