modify index in teacherAction