Analysis

A couple of functions that does the basic analysis and some necessary changes related to the analysis