automation of indexing of millig mechine