Replication script for table 4