added program to check index