updated with outlier detection