put udpate in gen_script