Not sure why I did it like this when I wrote it. Probably my thought was that this way is more pythonic.