add docstring for encoding argument