Outlier detection

Further implementation of outlier detection