reading code was done from the name table which obviously doesnt give the correct result