split out replication into own tool