added ability to remove NAN's