update stage number upon change