added whenDoneFunc.
use typesafe arango response.