get return value from async function javascript