make encode method to accept array of integers
Merge pull request #24 from leunggamciu/leunggamciu

make encode method to accept array of integers