add comments for the revised replacement code