Rewrite with promises
Recompile