outlier handling, CN calling and modified plotting functions