update before switching origins