update stage accordingly.