Completed function but no testing

Signed-off-by: jinshen <shen.jin19810809@gmail.com>