better size calculation