removing duplicated functions