update storage size function