Replace replicate (deprecated) by repeat