started sketching replication logic