first pass at multiple encoding support