added automatic form checker function