modifying to use ioAgent