added mode accessor in publickApi
rebuild