add replacement edge-cases