added replication on client side, not tested!