adding update switch to prevent updating on every run