better document data structure