Replace some function