analyzer function