added index to preferences