Uncommented mode function

Uncomment the mode function so that when call it will perform what it
should. Code not yet configured.