ST: code tested on the cloud and uses promises.