more skeleton code and tests for decode