added debug, probably decoding is wrong