added index and plaintext