added index to documents