I'm a little confused as the second file runs fine once, then errors out on a different part of the code