update control flow