decode and encode working in the GUI