fixed decoding and cached read
added doc