using is.binary() instead of class(x) <- c("binary").