better control of encoding