Updating REPLICATE method