please add some whitespace in this big if statement to break up the logic contained