changed replication logic
changed replication logic