implement synchronous JS calls