Solution for promise 6