changed input and output of captcha_function