the nesting level of this expression really scares me and future coders that would need to modify this. can we do this with regular if statements well documented?