rewrite with promises
1.0.0