add timeout to synchronous invocation