Added encoding (#23)