optimise unify logic
append sum method