Added buffer decoding