added tests for decode