index initialization works