javascript make async function synchronous