change activateIndex to boolean