Added threshol_pmi and fixed hardcoded attributes.