use function replace Event