pulling proc by index and printing pid