changed all put to creating element. the logic is now 1) creating a according element; 2) add it to the doc; 3) get the element out of doc; 4) get the value from the element. Also for printing, now it prints \x1 as \x01.