add description of the encode/decode algorithm