the SelectOutlier function has been checked and modified
First time complied