Added code example and discussion on futures and promises