refine encode plus code
Merge pull request #367 from volvet/refine-enc-plus

refine encode plus code