amortizing functions.
The amortize function is used only for testing purposes.