switching to asynchronous api with futures