add support for NaNs in acf; tested