remove custom decoding and fix tests