That line is kind of ugly but without the timeout the whole thing doesn't work. Any suggestions for another solution?