Added read/write interface to replica. Not working yet