now producing trees the same as the instructions
decode now working