added ability to set the encoding