added rub function, modified cut fonction