wait until replicator finishes rather than sleep loop