adds documentation on resolving promises