javascript await in synchronous function