implemented zprotocol - needs test