do security checks *after* checking captcha
4 times "elseif" is not the way

and precalc. value sometimes help if well commentent