replace by new func