add decode to simulator