fix Hom for (possibly non-abelian) groups