making the calls to client APIs synchronous