added automatic diffoff setting