example of converting callback to a future
simplified example
simplified some more
corrected formatting