simplify outlier detection function and move outside of main R file
add quick example