should work with promsie for array