updating size logic