new query auditData function