async/defer and promises

Updating the sample to the current best practices :)