Extension of n-groups