mode detection works.