encode docs in separate array for #373
retrieve docs from separate array #373
test docs in separate array