finished documenting decoder