add complex factory
merge test