added replication functions