fixed returntype, factorname and factorfunction mixup