separated out analyses functions