Adjusting the example to `promises`