experimental re-write of timeout code