condition for timeout added