added mode doc comments