work on promises of arrays