working branch logic (no bypasses)