implement retrieving document test