added outlier rejection