add encoding module parameter, fix 1 problem from issue #7