repaired accounting algorithm