Updated script to use encode
Merge pull request #19 from andreimacavei/master

Updated script to use encode