added a timeout counter