wip - more encoding support