added the missing code for index handover