Try implementing encode using Huffmann tree