add handlefunc sample