improved performance by about 15% by using Promise.all