accept job index as a flag