add 3 cases: loop, true, false checks