changes to the way documetns are returned