added addArrayMode, using Mode** argument