update joke function.