allow to set custom replication mode
fix iteration over dict