Worked on optimized decoding