add decoder

Enables basic decoder functionality