update
add smooth function