add control flow