could you break this up into an if statement? This is kind of annoying to read.