device selected control flow working