made a getchar function and am trying to make hufftree