added support for Promise<T>; close #11