Adding the replicate method.