tmp control flow