added index and new functions