working on decoder