added index and index tests