That seems like an interesting way of doing it as well. I've used promises before but not enough to be comfortable with this yet. Thanks for the tip!
If you want to really understand promises, this is a good resource: https://gist.github.com/domenic/3889970