calculation of depreciation