added xdr method and updated documentation