Rewrite featuring a synchronous and an asynchronous API