add captcha helper. optimized code