This whole else block is odd looking and visually difficult to parse based on the matching indents and delimiters and excessive nesting/whitespace