decoder working, with debug