added mode option