perform replace