correctly implement and test getDataSize()