add query timeout feature