added index to assignment