migrate callbacks to futures