add smooth step math function