calculate size button in a separate wrapper