Updated Encoder function
Merge pull request #1 from kmodlich/patch-1

Updated Encoder function