add encoding into args of new-funcs