corrected mpi scan by including math.h