iterated through each line to check for something