added index and testing