Remove method updated
Updated replace method