framework for decode