Adjusted IO to account for new input file. Noticed error in logic