update with functions and drop NAs