Adding a promises / deferreds javascript question and example.