added correct_NA.R function