changed to asynch IO, updated test