main c partial replication