Encoding

needs writing up by memory expert