'index' is an int already. There's no need to cast it to an int.