use &1 instead of %2 for even odd checking

use 
```
index&1==0
```
instead of 
```
index%2==0
```
for even odd checking