change to remove missing values and not only nans + new tests