updated to call done() when finished with a connection