add multi-args support for func factory