unify code