added undefined as failed in failed count