implemented indexed mutation