seperate function for getting a rare value
format line ending
add OMP flag