added a decoder for testing purposes