added timeout by timer interrupt