fix warnings by explicitely defining return types; fixed parameter type for component semigroup