Updated and fixed so-pmi calculations