extended the protocol to include a 'magic' prefix

The 'magic' number holds the protocol version in its last byte

documentation and all relevant functions have been updated