implemented simple dfd chain promise
fixed querying logic
Merge pull request #24 from bcho/develop

implemented deferred chain promise, fixed #1 in 4ea79ca