added index fixed copy