Improved compact code: sum consistent