Add a class and instance for replicateM_