Your program kept giving me an IndexError no matter what I did, and I traced it all the way back to here, as your program is designed to only work with one particular file containing these two phrases. Is there a way of making it work on any textfile?