creating a decoder