added comments to replica class