changed technique
Merge pull request #8 from kud/timeout

Better algo.