shouldn't this loop has some timeout?