initial implementation of incremental decoding