adjust update function to run without web page loop back