changes rep parameter to replicate across all relevant functions