smarter timeout