adding structure to index