updated with using Promise.all