useful scripts for cms analysis