global accounting function