retrieving all the documents in the database in one shot