move change logic before confirmation