making corrections; test for NaN fails still