changes to the way timeout works. Not perfect yet.