Ewww... that's a really long line with a bunch of conditionals. Let's extract those out into variables or functions.