update change of convert to catergorial (multiple) and Filter of random sample