Calculates automatically some sizes