utils: code unification