added function to get the storage size of a variable