Created depreciation function.

Created depreciation function.