- changed the logic to include the 'off' mode