trying to implement synchronous call api
it seems we have to use the ioloop