alter indexing logic

-start range from 0 and use -1 instead of 0 for unused activities