hacking some replication stuff