added loadsecrets to api2