- added an encoding argument