added better promise support
fixed .then promise
Merge pull request #37 from Zolmeister/master

Better promise support