rewrite form vaild .js file
check function