createCodeTree implemented and tested
decode implemented