- fixed read_document, forgot to convert the array to start from 1