amortization functions; test canvas graph