adding basic decoding