added first half of replicator