Working on the encoding