almost working ioloop