preliminary replication script