add args support for func factory