Added accounting function.