first draft of segment replication