add fail count feature