restructure test to use futures
each_limit interfaces with future