tweaked slab size calculation