fixed unification and allows calling functions wrapped in two ofs